package com.fastCms.business.bim.daos;

import java.util.List;

import com.fastCms.business.bim.pojo.entity.DataListen;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fastCms.business.bim.pojo.po.ChartPO;
import com.fastCms.business.bim.pojo.po.DateListenDeviceParamPO;
import com.fastCms.business.bim.pojo.po.RankPO;
import com.fastCms.business.bim.pojo.vo.ListenDataDetailVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 监测设备-数据 Mapper 接口
 * </p>
 *
 * @author liusq
 * @since 2021-04-22
 */
@Repository
public interface DataListenMapper extends BaseMapper<DataListen> {

    ListenDataDetailVO selectByDeviceId(@Param("deviceCode")String deviceCode);

    List<DataListen> getActualByDeviceId(@Param("deviceId") long deviceId);

    /**
     * 该设备最新的数据
     *
     * @param deviceTypeId
     * @return
     */
    List<ListenDataDetailVO> showListenDetailList(@Param("deviceTypeId") long deviceTypeId);


    List<ListenDataDetailVO> showDataListen(DateListenDeviceParamPO deviceParamPO);


    List<ListenDataDetailVO> showDataRankListen(RankPO rankPO);

    Integer countTsp(@Param("deviceTypeId") String deviceTypeId);

    List<ListenDataDetailVO> showListDate(ChartPO chartPO);

    List<ListenDataDetailVO> showListDateOnly(ChartPO chartPO);
}
